package cn.bob.controller;

import cn.bob.domain.User;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.client.RestTemplate;

/**
 * @author bob
 * @data 2022/11/8-17:34
 */
@RestController
@RequestMapping("/user")
public class UserContorller {
    @Value("${server.port}")
    private String port;

    @GetMapping("{id}")
    private User getUser(@PathVariable("id") Long id){
        return new User(id,"张长弓",23,"我在源码学java"+port);
    }


}
